﻿namespace SAD.ClientLogic
{
    using System;
    using System.Net.Sockets;
    using System.ServiceModel;
    using SAD.Common;

    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
    public class AdShowClientService : IShowNodeService
    {
        #region Instance
        /// <summary>
        /// AdShowClientService 实例
        /// </summary>
        public static AdShowClientService Instance
        {
            get
            {
                return m_Instance;
            }
        }
        private static AdShowClientService m_Instance = new AdShowClientService();
        #endregion

        private AdShowClientService()
        {
        }

        public delegate void NewAdInfoHandler(SAD.Common.Models.Info info);

        public event NewAdInfoHandler NewAdInfo;

        public string ShowClientID { get; set; }

        public AdShowClientService(string showClientID)
        {
            ShowClientID = "node1";
        }

        public void Start()
        {

        }

        public void Stop()
        {

        }

        public void ReceiveInfo(SAD.Common.Models.Info adInfo)
        {
            if (NewAdInfo != null)
            {
                NewAdInfo(adInfo);
            }
        }
    }
}
